<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateShopActivityTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('shop_activity', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name', 256)->comment('活动名称');
            $table->integer('shopid')->comment('商家id');
            $table->string('password')->default('')->comment('密码');
            $table->string('type', 64)->comment('类型');
            $table->dateTime('starttime')->comment('活动开始时间');
            $table->dateTime('endtime')->comment('活动截至时间');
            $table->integer('maxnum')->default(0)->comment('最大数量');
            $table->tinyInteger('issend')->default(1)->comment('是否继续发送');
            $table->tinyInteger('status')->comment('状态');
            $table->integer('adminid')->comment('操作人id');
            $table->string('info', 256)->nullable()->comment('预留字段');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('shop_activity');
    }
}
